package com.tenglong.teacher.ui.downApk;

import android.content.Context;
import android.content.Intent;

import com.tenglong.teacher.data.resultInfo.CurrentVersionInfo;
import com.tenglong.teacher.ui.dialog.VersionDialog;

import java.io.File;

/**
 * @author hdx on 2019/2/26.
 */
public class IContract {
    public interface View{
        void yetNewsVersion();

        void showUpdate(CurrentVersionInfo message, VersionDialog.VersionDialogInterface versionDialogInterface);

        void showProgress(int progress);

        void showFail(String msg);

        void showComplete();

        Intent install(File file);

        Context getAppContext();

        void onDestroy();

        void checkUpdate(int oldVersion,CheckUpdateListener listener);

        void downLoad();
    }

    public interface Presenter {
        void checkUpdate(int oldVersion,CheckUpdateListener listener);

        void downApk(Context context);

        void unbind(Context context);
    }
    public interface INotify {
        void prepare();

        void progress(String title, int progress);

        void complete(String title, String msg, Intent pIntent);

        void clear();

        void cancel();

        void fail(String title, String msg);
    }


    public interface CheckUpdateListener{
        void onIsHasNewsVersion(boolean IsHasNewsVersion);
    }
}
